package com.idconfirmsystem.handler;

import com.idconfirmsystem.Constants;
import com.idconfirmsystem.R;
import com.idconfirmsystem.activity.LoginControlActivity;
import com.idconfirmsystem.activity.MainActivity;
import com.idconfirmsystem.activity.TaskDetailActivity;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;

public class TaskDetailHandler extends Handler {
	private static final String TAG = "LoginControlActivity";

	private TaskDetailActivity context;

	public TaskDetailHandler(TaskDetailActivity context) {
		this.context = context;
	}

	public void handleMessage(Message msg) {
		switch (msg.what) {
		case Constants.SubTask.UPDATE_SUB_LIST:
//			context.updateSubList();
			break;
		case Constants.MsgWhat.GO_MENU_CONTROL_ACTIVITY:
			context.startActivity(new Intent(context, TaskDetailActivity.class));
			context.finish();
			break;
		case Constants.Login.DIALOG_SHOW:
			String message = context.getString(R.string.login_in);
			// context.dialogDisplay(message);
			break;
		case Constants.Login.DIALOG_DISMISS:
			// context.dialogDismiss();
			break;
		// case Constants.CaseCommon.terminal_id:
		// context.sayTerminalNo(CommonHelper.Msg.getMsgString(msg));
		// break;
		case Constants.Login.LOGIN:
			new Thread(new Runnable() {
				@Override
				public void run() {
					// TODO Auto-generated method stub
					// context.login();
				}
			}).start();
			break;
		default:
			String str = context.getString(R.string.login_in_faile);
			;
			if (str != null)
				// CommonHelper.Msg.showShortText(context, str);
				break;
		}
		super.handleMessage(msg);
	}

}
